﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace FIFP.DashBoard.Model
{
    public class ReducedCapacityComparer : IEqualityComparer<ReducedCapacity>
    {

        public bool Equals(ReducedCapacity x, ReducedCapacity y)
        {
            if (x.PlanId.Equals(y.PlanId) && x.UnitId.Equals(y.UnitId) && x.ParentUnitId.Equals(y.ParentUnitId) && x.StartDate.Equals(y.StartDate) && x.Equals(y.EndDate))
                return true;
            else
                return false;
        }

        public int GetHashCode(ReducedCapacity obj)
        {
            return obj.UnitId;
        }
    }
}
